package com.ybkj.daijia.server.model;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 汽车
 *
 * @author Shine
 */
public class Car extends Base {

    /**
     * 限行
     */
    public static final int CAR_LIMITLINE_NO = 0;
    public static final int CAR_LIMITLINE_YES = 1;
    /**
     * 状态
     */
    public static final int CAR_STATUS_BUSY = 0;
    public static final int CAR_STATUS_FREE = 1;
    /**
     * 用途
     */
    public static final int CAR_USE_RENT = 0;
    public static final int CAR_USE_CONTRACT = 1;
    public static final int CAR_USE_BOTH = 2;
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private Long brandId;//品牌

    private Brand brand;//品牌

    private Long brandTypeId;//品牌型号

    private BrandType brandType;//品牌类型

    private Long carTypeId;//汽车类型

    private CarType carType;//汽车类型

    private String name;//汽车名称

    private String carNumber;//车牌号

    private BigDecimal price;//租车价格

    private TransmissionCase transmissionCase;//变速箱 0手动 1自动

    private String displacement;//排量

    private Integer seating;//座位数

    private Double drivingDistance;// 已行驶里程

    private Date buyTime;//购置时间

    private String picture;//汽车图片

    private String place;//所在地

    private String limitLine;// 限行

    private Integer status;//状态: 0忙碌  1空闲

    private Integer purpose;//用途 0租车 1专车 2租车或专车

    private String provincial;//省

    private String city;//市

    private String county;//县

    private String type;//车型

    private Long companyId;//所属公司Id

    private BigDecimal deposit;//押金

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    public String getDisplacement() {
        return displacement;
    }

    public void setDisplacement(String displacement) {
        this.displacement = displacement;
    }

    public Integer getSeating() {
        return seating;
    }

    public void setSeating(Integer seating) {
        this.seating = seating;
    }

    public Double getDrivingDistance() {
        return drivingDistance;
    }

    public void setDrivingDistance(Double drivingDistance) {
        this.drivingDistance = drivingDistance;
    }

    public Date getBuyTime() {
        return buyTime;
    }

    public void setBuyTime(Date buyTime) {
        this.buyTime = buyTime;
    }


    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public String getLimitLine() {
        return limitLine;
    }

    public void setLimitLine(String limitLine) {
        this.limitLine = limitLine;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getPurpose() {
        return purpose;
    }

    public void setPurpose(Integer purpose) {
        this.purpose = purpose;
    }

    public String getProvincial() {
        return provincial;
    }

    public void setProvincial(String provincial) {
        this.provincial = provincial;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public Brand getBrand() {
        return brand;
    }

    public void setBrand(Brand brand) {
        this.brand = brand;
    }

    public BrandType getBrandType() {
        return brandType;
    }

    public void setBrandType(BrandType brandType) {
        this.brandType = brandType;
    }

    public CarType getCarType() {
        return carType;
    }

    public void setCarType(CarType carType) {
        this.carType = carType;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public Long getBrandTypeId() {
        return brandTypeId;
    }

    public void setBrandTypeId(Long brandTypeId) {
        this.brandTypeId = brandTypeId;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Long getCarTypeId() {
        return carTypeId;
    }

    public void setCarTypeId(Long carTypeId) {
        this.carTypeId = carTypeId;
    }


    public TransmissionCase getTransmissionCase() {
        if (null == transmissionCase) {
            return TransmissionCase.AT;
        }
        return transmissionCase;
    }

    public void setTransmissionCase(TransmissionCase transmissionCase) {
        this.transmissionCase = transmissionCase;
    }


    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public BigDecimal getDeposit() {
        return deposit;
    }

    public void setDeposit(BigDecimal deposit) {
        this.deposit = deposit;
    }


    public enum TransmissionCase {
        /**
         * 自动挡
         */
        AT,
        /**
         * 手动挡
         */
        MT
    }

}